# cli.py
import argparse
from load_config import load_config
from load_prompt import load_prompt
from openai_api import call_openai_api
from output import output_result


def main():
    try:
        # 加载配置
        config = load_config()
        # 加载提示词
        prompt = load_prompt(config)
        # 调用 OpenAI API
        result = call_openai_api(prompt, config)
        # 输出结果
        print(result)
    except Exception as e:
        print(e)    

if __name__ == '__main__':
    main()